﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FBA.Client.Models;
using FBA.Client.Utils;

namespace FBA.Client.Data
{
    public partial class EnumProvider
    {
        public bool Optional { get; set; }

        /// <summary>
        /// 组织机构类型
        /// </summary>
        public List<IntEntry> OrganizationType
        {
            get
            {
                IntEntry[] array = new IntEntry[]
                {
                    new IntEntry() { Value = 1, Name = Language.Get("Lang.Enum.OrganizationType.1")},
                    new IntEntry() { Value = 2, Name = Language.Get("Lang.Enum.OrganizationType.2")},
                    new IntEntry() { Value = 3, Name = Language.Get("Lang.Enum.OrganizationType.3")},
                };
                List<IntEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new IntEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 状态
        /// </summary>
        public List<IntEntry> Status
        {
            get
            {
                IntEntry[] array = new IntEntry[]
                {
                    new IntEntry() { Value = 0, Name = Language.Get("Lang.Status.Default.0")},
                    new IntEntry() { Value = 1, Name = Language.Get("Lang.Status.Default.1")},
                };
                List<IntEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new IntEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 性别
        /// </summary>
        public List<IntEntry> Gender
        {
            get
            {
                IntEntry[] array = new IntEntry[]
                {
                    new IntEntry() { Value = 0, Name = Language.Get("Lang.Enum.Gender.0")},
                    new IntEntry() { Value = 1, Name = Language.Get("Lang.Enum.Gender.1")}
                };
                List<IntEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new IntEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 发票类型
        /// </summary>
        public List<IntEntry> InvoiceType
        {
            get
            {
                IntEntry[] array = new IntEntry[] {
                    new IntEntry() { Value = 1, Name = Language.Get("Lang.Enum.InvoiceType.1")},
                    new IntEntry() { Value = 2, Name = Language.Get("Lang.Enum.InvoiceType.2")},
                    new IntEntry() { Value = 3, Name = Language.Get("Lang.Enum.InvoiceType.3")}
                };
                List<IntEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new IntEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 客户状态（只需显示删除和已激活）
        /// </summary>
        public List<IntEntry> ClientStatus
        {
            get
            {
                IntEntry[] array = new IntEntry[] {
                      new IntEntry() { Value = 0, Name = Language.Get("Lang.Status.Client.0")},
                    //new IntEntry() { Value = 1, Name = Language.Get("Lang.Status.Client.1")},
                      new IntEntry() { Value = 2, Name = Language.Get("Lang.Status.Client.2")}
                };
                List<IntEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new IntEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 客户来源
        /// </summary>
        public List<IntEntry> ClientSource
        {
            get
            {
                IntEntry[] array = new IntEntry[] {
                    new IntEntry() { Value = 1, Name = Language.Get("Lang.Enum.ClientSource.1")},
                    new IntEntry() { Value = 2, Name = Language.Get("Lang.Enum.ClientSource.2")},
                    new IntEntry() { Value = 3, Name = Language.Get("Lang.Enum.ClientSource.3")}
                };
                List<IntEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new IntEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 客户类型
        /// </summary>
        public List<StringEntry> ClientType
        {
            get
            {
                StringEntry[] array = new StringEntry[]
                {
                    new StringEntry() { Value="INDIVIDUAL",Name=Language.Get("Lang.Enum.ClientType.INDIVIDUAL")},
                    new StringEntry() { Value="COMPANY",Name=Language.Get("Lang.Enum.ClientType.COMPANY")}
                };
                List<StringEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new StringEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 结算模式
        /// </summary>
        public List<StringEntry> BillingMode
        {
            get
            {
                StringEntry[] array = new StringEntry[]
                {
                        new StringEntry() { Value="MONTHLY",Name=Language.Get("Lang.Enum.BillingMode.MONTHLY")},
                        new StringEntry() { Value="WEEKLY",Name=Language.Get("Lang.Enum.BillingMode.WEEKLY")},
                        new StringEntry() { Value="CASH",Name=Language.Get("Lang.Enum.BillingMode.CASH")},
                };
                List<StringEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new StringEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 计泡方式
        /// </summary>
        public List<IntEntry> VolumetricMethod
        {
            get
            {
                IntEntry[] array = new IntEntry[]
                {
                    new IntEntry() { Value=3000,Name=Language.Get("Lang.Enum.VolumetricMethod.÷3000")},
                    new IntEntry() { Value=4000,Name=Language.Get("Lang.Enum.VolumetricMethod.÷4000")},
                    new IntEntry() { Value=5000,Name=Language.Get("Lang.Enum.VolumetricMethod.÷5000")},
                    new IntEntry() { Value=6000,Name=Language.Get("Lang.Enum.VolumetricMethod.÷6000")},
                    new IntEntry() { Value=7000,Name=Language.Get("Lang.Enum.VolumetricMethod.÷7000")},
                    new IntEntry() { Value=8000,Name=Language.Get("Lang.Enum.VolumetricMethod.÷8000")},
                    new IntEntry() { Value=9000,Name=Language.Get("Lang.Enum.VolumetricMethod.÷9000")},
                    new IntEntry() { Value=10000,Name=Language.Get("Lang.Enum.VolumetricMethod.÷10000")},
                    new IntEntry() { Value=11000,Name=Language.Get("Lang.Enum.VolumetricMethod.÷11000")},
                    new IntEntry() { Value=12000,Name=Language.Get("Lang.Enum.VolumetricMethod.÷12000")}
                };
                List<IntEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new IntEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 用户状态
        /// </summary>
        public List<IntEntry> UserStatus
        {
            get
            {
                IntEntry[] array = new IntEntry[] {
                    new IntEntry() { Value = 1, Name = Language.Get("Lang.Status.User.1")},
                    new IntEntry() { Value = 2, Name = Language.Get("Lang.Status.User.2")}
                };
                List<IntEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new IntEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 价格类型（0 速查  1总乘  2增量）
        /// </summary>
        public List<IntEntry> PriceType
        {
            get
            {
                IntEntry[] array = new IntEntry[] {
                    new IntEntry() { Value = 0, Name = Language.Get("Lang.Enum.PriceType.0")},
                    new IntEntry() { Value = 1, Name = Language.Get("Lang.Enum.PriceType.1")},
                    new IntEntry() { Value = 2, Name = Language.Get("Lang.Enum.PriceType.2")} };
                List<IntEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new IntEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 日期类型（订单管理）
        /// </summary>
        public List<StringEntry> DateType
        {
            get
            {
                StringEntry[] array = new StringEntry[] {
                    new StringEntry() { Value = "业务日期", Name = Language.Get("Lang.BusinessDate")},
                    new StringEntry() { Value = "出入日期", Name = Language.Get("Lang.EntryAndExitDate") },
                    new StringEntry() { Value = "签收日期", Name = Language.Get("Lang.SigningDate")}
                };
                List<StringEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new StringEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 订单状态（订单管理）
        /// </summary>
        public List<IntEntry> OrderStatus
        {
            get
            {
                IntEntry[] array = new IntEntry[] {
                    new IntEntry() { Value = 10, Name = Language.Get("Lang.Status.Order.10")},
                    new IntEntry() { Value = 20, Name = Language.Get("Lang.Status.Order.20")},
                    new IntEntry() { Value = 21, Name = Language.Get("Lang.Status.Order.21")},
                    new IntEntry() { Value = 30, Name = Language.Get("Lang.Status.Order.30") },
                    new IntEntry() { Value = 41, Name = Language.Get("Lang.Status.Order.41")},
                    new IntEntry() { Value = 42, Name = Language.Get("Lang.Status.Order.42")},
                    new IntEntry() { Value = 43, Name = Language.Get("Lang.Status.Order.43") },
                    new IntEntry() { Value = 44, Name = Language.Get("Lang.Status.Order.44")},
                    new IntEntry() { Value = 45, Name = Language.Get("Lang.Status.Order.45")},
                    new IntEntry() { Value = 50, Name = Language.Get("Lang.Status.Order.50")},
                     new IntEntry() { Value = 60, Name = Language.Get("Lang.Status.Order.60")}
                };
                List<IntEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new IntEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 总单状态
        /// </summary>
        public List<IntEntry> OrderCollectionStatus
        {
            get
            {
                IntEntry[] array = new IntEntry[] {
                    new IntEntry() { Value = 0, Name = Language.Get("Lang.Status.OrderCollection.0")},
                    new IntEntry() { Value = 1, Name = Language.Get("Lang.Status.OrderCollection.1")},
                    new IntEntry() { Value = 2, Name = Language.Get("Lang.Status.OrderCollection.2")}
                };
                List<IntEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new IntEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 付款方式
        /// </summary>
        /*此方法重复，结算模式已经有枚举了
        public List<StringEntry> PaymentMethod
        {
            get
            {
                StringEntry[] array = new StringEntry[] {
                    new StringEntry() { Value = "MONTHLY", Name = Language.Get("Lang.Enum.BillingMode.MONTHLY")},
                    new StringEntry() { Value = "WEEKLY", Name = Language.Get("Lang.Enum.BillingMode.WEEKLY") },
                    new StringEntry() { Value = "CASH", Name = Language.Get("Lang.Enum.BillingMode.CASH")},
                };
                List<StringEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new StringEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }
        */

        /// <summary>
        /// 输入方式（1-运单号  2-转单号  4-客户） 1-运单号  2-转单号  3-运单号+转单号  5-运单号+客户  6-转单号+客户  7-运单号+转单号+客户
        /// </summary>
        public List<IntEntry> InputType
        {
            get
            {
                IntEntry[] array = new IntEntry[] {
                    new IntEntry() { Value = 1, Name = Language.Get("Lang.Type.InputType.1") },
                    new IntEntry() { Value = 2, Name = Language.Get("Lang.Type.InputType.2")},
                    new IntEntry() { Value = 3, Name = Language.Get("Lang.Type.InputType.3")},
                    new IntEntry() { Value = 5, Name = Language.Get("Lang.Type.InputType.5")},
                    new IntEntry() { Value = 6, Name = Language.Get("Lang.Type.InputType.6")},
                    new IntEntry() { Value = 7, Name = Language.Get("Lang.Type.InputType.7") }
                };
                List<IntEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new IntEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 轨迹状态（轨迹映射）
        /// </summary>
        public List<StringEntry> TrackStatus
        {
            get
            {
                StringEntry[] array = new StringEntry[] {
                    new StringEntry() { Value = "NOT_ONLINE", Name = Language.Get("Lang.Status.Track.NOT_ONLINE")},
                    new StringEntry() { Value = "ONLINE", Name = Language.Get("Lang.Status.Track.ONLINE") },
                    new StringEntry() { Value = "TRANSIT", Name = Language.Get("Lang.Status.Track.TRANSIT")},
                    new StringEntry() { Value = "IN_TRANSIT", Name = Language.Get("Lang.Status.Track.IN_TRANSIT")},
                    new StringEntry() { Value = "CLEARANCE", Name = Language.Get("Lang.Status.Track.CLEARANCE") },
                    new StringEntry() { Value = "DELIVERY", Name = Language.Get("Lang.Status.Track.DELIVERY")},
                    new StringEntry() { Value = "DELIVERED", Name = Language.Get("Lang.Status.Track.DELIVERY")},
                    new StringEntry() { Value = "CLEARANCE_ABN", Name = Language.Get("Lang.Status.Track.CLEARANCE_ABN") },
                    new StringEntry() { Value = "DISPATCH_ABN", Name = Language.Get("Lang.Status.Track.DISPATCH_ABN")},
                    new StringEntry() { Value = "TRANSIT_ABN", Name = Language.Get("Lang.Status.Track.TRANSIT_ABN")},
                    new StringEntry() { Value = "OPERATE_ABN", Name = Language.Get("Lang.Status.Track.OPERATE_ABN")},
                    new StringEntry() { Value = "PARCEL_ABN", Name = Language.Get("Lang.Status.Track.PARCEL_ABN")}
               };
                List<StringEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new StringEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 面单类型
        /// </summary>
        public List<StringEntry> LabelType
        {
            get
            {
                StringEntry[] array = new StringEntry[] {
                    new StringEntry() { Value = "ORDER", Name = Language.Get("Lang.Enum.Label.ORDER")}
                };
                List<StringEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new StringEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 货物类型
        /// </summary>
        public List<IntEntry> GoodsType
        {
            get
            {
                IntEntry[] array = new IntEntry[] {
                    new IntEntry() { Value = 0, Name = Language.Get("Lang.File") },
                    new IntEntry() { Value = 1, Name = Language.Get("Lang.Package")},
                    new IntEntry() { Value = 2, Name = Language.Get("Lang.WaterproofBag")},
                };
                List<IntEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new IntEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 输入类型
        /// </summary>
        public List<StringEntry> InputDataType
        {
            get
            {
                StringEntry[] array = new StringEntry[] {
                    new StringEntry() { Value = "Date", Name = Language.Get("Lang.Enum.InputType.Date") },
                    new StringEntry() { Value = "Dictionary", Name = Language.Get("Lang.Enum.InputType.Dictionary")},
                    new StringEntry() { Value = "Enum", Name = Language.Get("Lang.Enum.InputType.Enum")},
                    new StringEntry() { Value = "In", Name = Language.Get("Lang.Enum.InputType.In")},
                    new StringEntry() { Value = "Number", Name = Language.Get("Lang.Enum.InputType.Number")},
                    new StringEntry() { Value = "Text", Name = Language.Get("Lang.Enum.InputType.Text") },
                };
                List<StringEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new StringEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        // 付款类型
        public List<StringEntry> PaymentType
        {
            get
            {
                StringEntry[] array = new StringEntry[] {
                    new StringEntry() { Value = "0", Name = Language.Get("Lang.Enum.PaymentType.Cash") },
                    new StringEntry() { Value = "1", Name = Language.Get("Lang.Enum.PaymentType.Transfer")},
                    new StringEntry() { Value = "2", Name = Language.Get("Lang.Enum.PaymentType.Network")},
                    new StringEntry() { Value = "3", Name = Language.Get("Lang.Enum.PaymentType.WriteOff")},
                    //new StringEntry() { Value = "Indemnity", Name = Language.Get("Lang.Enum.PaymentType.Indemnity")},
                    new StringEntry() { Value = "4", Name = Language.Get("Lang.Enum.PaymentType.Other") },
                };
                List<StringEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new StringEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        //  支付状态
        public List<StringEntry> PaymentStatus
        {
            get
            {
                StringEntry[] array = new StringEntry[] {
                    new StringEntry() { Value = "0", Name = Language.Get("Lang.Status.PaymentStatus.0") },
                    new StringEntry() { Value = "1", Name = Language.Get("Lang.Status.PaymentStatus.1")}
                };
                List<StringEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new StringEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        //  账单状态
        public List<StringEntry> BillStatus
        {
            get
            {
                StringEntry[] array = new StringEntry[] {
                    new StringEntry() { Value = "0", Name = Language.Get("Lang.Status.BillStatus.0") },
                    new StringEntry() { Value = "1", Name = Language.Get("Lang.Status.BillStatus.1")},
                     new StringEntry() { Value = "2", Name = Language.Get("Lang.Status.BillStatus.2")}
                };
                List<StringEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new StringEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        //  成本匹配
        public List<StringEntry> MatchingMethod
        {
            get
            {
                StringEntry[] array = new StringEntry[] {
                    new StringEntry() { Value = "0", Name = Language.Get("Lang.WaybillNumber") },
                    new StringEntry() { Value = "1", Name = Language.Get("Lang.TransportNumber")},
                     new StringEntry() { Value = "2", Name = Language.Get("Lang.ReferenceNo")}
                };
                List<StringEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new StringEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        //  账单类型
        public List<StringEntry> BillType
        {
            get
            {
                StringEntry[] array = new StringEntry[] {
                    new StringEntry() { Value = "1", Name = Language.Get("Lang.MonthlyAndWeeklyBill") },
                    new StringEntry() { Value = "2", Name = Language.Get("Lang.ExCreditsBill")}
                };
                List<StringEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new StringEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

        /// <summary>
        /// 客户来源
        /// </summary>
        public List<StringEntry> TrackingSource
        {
            get
            {
                StringEntry[] array = new StringEntry[] {
                    new StringEntry() { Name = Language.Get("Lang.Artificial")},
                    new StringEntry() {  Name = Language.Get("Lang.system")},
                    new StringEntry() {  Name = Language.Get("Lang.NextHome")}
                };
                List<StringEntry> list = array.ToList();
                if (Optional == true)
                {
                    list.Insert(0, new StringEntry()
                    {
                        Name = Language.Get("Lang.None")
                    });
                }
                return list;
            }
        }

    }
}